package com.hk.service.sys;

import java.math.BigInteger;
import java.util.List;

import com.hk.commons.HqlFilter;
import com.hk.commons.SqlFilter;
import com.hk.commons.entity.Answer;

public interface IAnswer {

	/** 根据id获实体 */
	public Answer findById(Long id);

	/** 添加 **/
	public Long add(Answer model);

	/** 更新 **/
	public void update(Answer model);

	/** 删除 **/
	public Answer delete(Long id);

	/** 判断用户是否做过风险测评 **/
	public Boolean checkByUserId(Long userId);


	/** 分页获取 */
	public List<Answer> find(int pageNum, int pageSize);

	public List<Answer> findByFilter(HqlFilter hqlFilter);

	public List<Answer> findByFilter(HqlFilter hqlFilter, int pageNum,
			int pageSize);

	public Long countByFilter(HqlFilter hqlFilter);

	public List<Answer> findBySqlFilter(SqlFilter sqlFilter);

	public List<Answer> findBySqlFilter(SqlFilter sqlFilter, int page, int rows);

	public BigInteger countBySqlFilter(SqlFilter sqlFilter);

	public Answer getByMobileId(String mobileId);

	public Answer getByUserId(Long userId);

	public void updKycUrl(long userId);

	public  boolean moreThanOneYear(long userId);
}
